<template>
  <div>
    <rate 
      :starIndex="starIndex"
      :imgUrl="imgUrl"
      :imgUrlSelect="imgUrlSelect"
      @change="rateChange"
    />
  </div>
</template>
<script setup lang="ts">
  // import todoList from '@/components/todoList.vue'
  // import todoList from '@/components/todoListTs.vue'
  // import sbearch from '@/components/sbearch.vue'
  import rate from '@/components/rate.vue'
  import {ref} from 'vue';
  import type {Ref} from 'vue';
  
  const starIndex:Ref<number> = ref(1);

  const imgUrl:string = require('@/assets/img/start.png');
  const imgUrlSelect:string = require('@/assets/img/start_select.png');
    

  // 响应事件
  function rateChange(e:number){
    // console.log(e,'App.vue');
    starIndex.value = e;
  }
</script>
<style>
  *{
    margin: 0;
    padding: 0;
  }
</style>